package com.xzl.xep.service.impl;

import java.io.Serializable;
import java.util.Collection;

import javax.annotation.Resource;

import com.xzl.xep.dao.BaseDao;
import com.xzl.xep.service.BaseService;

public class BaseServiceImpl implements BaseService{

	@Resource(name="baseDao")
	protected BaseDao dao;
	
	public <T> T  saveObject(T object){
		return dao.saveObject(object);
	}
	
	

	public <T> T  saveOrUpdateObject(T object){
		return dao.saveOrUpdateObject(object);
	}


	public <T> T  updateObject(T object) {
		return dao.updateObject(object);
	}

	public  <T> void delObject(T object) {
		dao.delObject(object);
	}
	
	
	public  <T> T loadObject(Class<T> clazz, Serializable id){
		return dao.loadObject(clazz, id);
	}
	
	public <T> void saveCollection(Collection<T> collection) {
		dao.saveCollection(collection);
	}
}
